package com.huak.boot.context;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 * AfterHelloApplicationContextInitializer
 * @author LR2SD
 * @description
 * @date 2019-03-30 09:27
 */

public class AfterHelloApplicationContextInitializer<C extends ConfigurableApplicationContext> implements ApplicationContextInitializer<C>,Ordered {

    @Override
    public void initialize(C configurableApplicationContext) {
        System.out.println("after configurableApplicationContext.id="+configurableApplicationContext.getId());
    }

    @Override
    public int getOrder() {
        return Ordered.LOWEST_PRECEDENCE;
    }
}
